<button nz-button nzType="primary" (click)="open()" style="margin-bottom: 20px;">新增</button>
<nz-table #basicTable [nzData]="listOfData">
  <thead>
  <tr>
    <th>标题</th>
    <th>图片</th>
    <th>富文本</th>
    <th>操作</th>
  </tr>
  </thead>
  <tbody>
  <tr *ngFor="let data of listOfData">
    <td>{{ data.title }}</td>
    <img [src]="data.image" class="avatar" />
    <td>{{ data.content }}</td>
    <td>
      <a (click)="editFun(data)">修改</a>
    </td>
  </tr>
  </tbody>
</nz-table>
<nz-drawer
  [nzClosable]="false"
  [nzVisible]="visible"
  nzPlacement="right"
  nzTitle="轮播功能"
  [nzWidth]="720"
  (nzOnClose)="close()"
>
  <input nz-input placeholder="标题" [(ngModel)]="title" style="margin-bottom: 20px;"/>
  <nz-upload
    class="avatar-uploader"
    nzAction= "{{API_URL}}/admin/upload/file"
    nzName="file"
    nzListType="picture-card"
    [nzShowUploadList]="false"
    [nzBeforeUpload]="beforeUpload"
    (nzChange)="handleChange($event)"
    [nzHeaders]="header"
  >
    <ng-container *ngIf="!avatarUrl">
      <i class="upload-icon" nz-icon [nzType]="loading ? 'loading' : 'plus'"></i>
      <div class="ant-upload-text">Upload</div>
    </ng-container>
    <img *ngIf="avatarUrl" [src]="avatarUrl" class="avatar" />
  </nz-upload>
  <!--<quill-editor  (onEditorCreated)="EditorCreated($event)" [(ngModel)]='htmlcontext' [modules]="config" [styles]="{height: '250px'}" ></quill-editor>-->
  <quill-editor  (onEditorCreated)="EditorCreated($event)" [(ngModel)]='htmlcontext'  [styles]="{height: '250px'}" ></quill-editor>
  <button nz-button nzType="primary" (click)="submit()" style="margin-top: 20px;" *ngIf="editId == 0">添加</button>
  <button nz-button nzType="primary" (click)="update()" style="margin-top: 20px;" *ngIf="editId != 0">修改</button>
</nz-drawer>
